package com.mofeng.myshop.domain.po.base;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(name = "基础信息",description="基础表的信息")
public class BaseEntity implements Serializable {

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    protected Long id;

    @Schema(description =  "名称")
    protected String name;

    @Schema(description =  "备注")
    protected String remarks ="无";

    @Schema(description =  "描述")
    protected String description = "";

    @Schema(description =  "排序索引")
    protected Integer orderIndex;

    @Schema(description =  "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    protected Date createTime;

    @Schema(description =  "更新时间")
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    protected Date updateTime;

}

